package com.bakend.modules.sys.entity;

import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;

/**
 * (Permission)表实体类
 *
 * @author makejava
 * @since 2021-05-02 03:28:57
 */
@SuppressWarnings("serial")
public class Permission extends Model<Permission> {

    private Integer id;
    //资源名称
    private String name;
    //权限细则，crud位表示。比如 user:1，表示user功能有新增功能
    private String resource;
    //资源类型：menu，button，permission
    private String type;
    //访问的url[前后端都适用]
    private String url;
    //权限代码字符串
    private String percode;
    //父节点id
    private Integer parentId;
    //父节点id列表串，以逗号分隔
    private String parentIds;
    //排序号
    private String sort;
    //状态，1可用，0不可用
    private String status;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getResource() {
        return resource;
    }

    public void setResource(String resource) {
        this.resource = resource;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getPercode() {
        return percode;
    }

    public void setPercode(String percode) {
        this.percode = percode;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public String getParentIds() {
        return parentIds;
    }

    public void setParentIds(String parentIds) {
        this.parentIds = parentIds;
    }

    public String getSort() {
        return sort;
    }

    public void setSort(String sort) {
        this.sort = sort;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}